Add Streamlit support to Python Extensions (Experimental)#954
Merged
aaronpowell merged 10 commits intomainfrom Nov 16, 2025
Merged
Add Streamlit support to Python Extensions (Experimental)#954aaronpowell merged 10 commits intomainfrom
aaronpowell merged 10 commits intomainfrom
Conversation
Co-authored-by: tommasodotNET <12819039+tommasodotNET@users.noreply.github.com>
Co-authored-by: tommasodotNET <12819039+tommasodotNET@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Streamlit support to Python extension
Add Streamlit support to Python Extensions
Nov 6, 2025
tommasodotNET
requested changes
Nov 6, 2025
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppResource.cs
Show resolved
Hide resolved
Contributor
|
@copilot work on the review comments |
…ecutable Co-authored-by: tommasodotNET <12819039+tommasodotNET@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds Streamlit support to the Python Extensions for .NET Aspire, allowing developers to host Streamlit applications within Aspire. This includes the resource definition, hosting extension methods, example application, and tests.
- Adds
StreamlitAppResourceandStreamlitAppHostingExtensionfor Streamlit support - Includes a working example Streamlit application with proper setup documentation
- Adds test coverage for both resource creation and integration testing
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| StreamlitAppResource.cs | Defines the Streamlit application resource model |
| StreamlitAppHostingExtension.cs | Provides extension methods to add Streamlit apps to the app builder |
| ResourceCreationTests.cs | Adds unit test for Streamlit resource creation |
| AppHostTests.cs | Adds integration test for Streamlit app startup |
| README.md (extensions) | Documents Streamlit usage example |
| Program.cs (AppHost) | Adds Streamlit app to the example host |
| streamlit-api/* | Example Streamlit application with dependencies and documentation |
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppHostingExtension.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppHostingExtension.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/README.md
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppHostingExtension.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppHostingExtension.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…tAppHostingExtension.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
aaronpowell
reviewed
Nov 6, 2025
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppHostingExtension.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.Python.Extensions/StreamlitAppHostingExtension.cs
Outdated
Show resolved
Hide resolved
… as experimental Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
Copilot
AI
changed the title
Add Streamlit support to Python Extensions
Add Streamlit support to Python Extensions (Experimental)
Nov 11, 2025
This was referenced Dec 21, 2025
Closed
This was referenced Dec 29, 2025
This was referenced Jan 5, 2026
Closed
This was referenced Jan 12, 2026
Closed
This was referenced Feb 8, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
AddStreamlitApp()extension method to host Streamlit applications in Aspire, using the Aspire.Hosting.Python integration.Implementation
StreamlitAppResource: Resource definition inheriting fromPythonAppResourcewith service discovery supportStreamlitAppHostingExtension: Extension method usingAddPythonExecutablefrom Aspire.Hosting.PythonWithPip(),WithUv(), andWithVirtualEnvironment()[Experimental("CTASPIRE001")]attribute as it relies on patterns that will be publicly exposed in Aspire 13.1Usage
Note: This integration is experimental and subject to change. The implementation will be updated when
AddPythonAppCorebecomes publicly available in Aspire.Hosting.Python (expected in Aspire 13.1).Testing
Added unit test validating resource creation
Added integration test to AppHost example (currently skipped per issue Review the Python extensions relative to the new Python hosting integration #917)
Included minimal Streamlit example app in
examples/python/streamlit-api/Experimental diagnostic warnings suppressed in tests and examples
Fixes Add Streamlit to PythonExtention #953
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.